<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>学生修改</title>
</head>
<body>
<form method="post" action="updateStudent">
            <input type="hidden" name="id" value="{$getUpdate.id}">
    学生名字:<input type="text" name="name" value="{$getUpdate.name}"><br>
    学生密码:<input type="text" name="password" value="{$getUpdate.password}"><br>
    学生性别:<input type="text" name="sex" value="{$getUpdate.sex}"><br>
    学生年龄:<input type="text" name="age" value="{$getUpdate.age}"><br>

    学生班级:
    <select name="cls_id">
        {foreach($selectClasses as $key=>$value)}
            {if in_array($value.id,$classes_id)}
                <option value="{$value.id}" selected>{$value.name}</option>
            {else/}
                <option value="{$value.id}">{$value.name}</option>
            {/if}
        {/foreach}
    </select><br>

    科目:
         {foreach($selectCourse as $key=>$value)}
            {if in_array($value.id,$course_id)}
                {$value.name}:<input type="checkbox" name="c_name[{$value.id}]" value="{$value.id}" checked> &nbsp &nbsp
            {else/}
    {$value.name}:<input type="checkbox" name="c_name[{$value.id}]" value="{$value.id}"> &nbsp &nbsp
            {/if}
         {/foreach}
    <button type="submit">提交</button>
</form>
</body>
</html>